use Data::Dumper qw(Dumper);
use Getopt::Long qw(GetOptions);
 
my $name;
my $age;
GetOptions ("name=s" => \$name, "age=s" => \$age) or die("Error in command line arguments\n");
print "$name \n" if(defined($name));
print "$age \n" if(defined($age));
print Dumper \@ARGV;
 
 
# $ perl temp.pl -n Ajanuw a.txt b.txt
# Ajanuw 
# $VAR1 = [
#           'a.txt',
#           'b.txt'
#         ];

